<?php
/**
 * PHP By Example
 *
 * @copyright 2015 Michel Corne <mcorne@yahoo.com>
 * @license   http://www.opensource.org/licenses/gpl-3.0.html GNU GPL v3
 */
?>

<div class="links">

  <select id="language"
          onchange="change_language(this, '<?=$this->_language->language_id;?>')">

    <?php foreach ($this->_language->languages as $language_id => $language) :?>
    <option <?php if($language_id == $this->_language->language_id):?>selected="selected"<?php endif;?>
            title="<?=$language['english_name'];?>"
            value="<?=$language_id;?>">
        <?=$language['original_name'];?>
    </option>
    <?php endforeach;?>

  </select>

  <a href="<?=$this->_output->display_url('help');?>"><?=$this->_message_translation->translate('Help');?></a>
  <a href="<?=$this->_output->display_url('misc');?>"><?=$this->_message_translation->translate('Misc');?></a>

  <?php if ($this->_application->function_name):?>
    <a href="<?=$this->_output->display_url('config', $this->_application->function_name);?>"><?=$this->_message_translation->translate('Config');?></a>
    <a href="<?=$this->_output->display_url('test', $this->_application->function_name);?>"><?=$this->_message_translation->translate('Test');?></a>
    <a href="<?=$this->_output->display_url('unit_test', $this->_application->function_name);?>"><?=$this->_message_translation->translate('Unit test');?></a>

    <?php require "$this->application_path/views/php_manual_location.phtml";?>
  <?php endif;?>

  <?php if ($this->_application->custom_function_name):?>
    <a href="<?=$this->_output->display_url('function', $this->_application->custom_function_name);?>"><?=$this->_message_translation->translate('Source code');?></a>
    <a href="<?=$this->_output->display_url('unit_test', $this->_application->custom_function_name);?>"><?=$this->_message_translation->translate('Unit test');?></a>
  <?php endif;?>

</div>

<div class="copyright">
   <div>

     Powered by <a href="http://php.net">PHP</a>&nbsp;<?=PHP_VERSION;?>
     (<?=$this->_output->display_duration();?> s)

   </div>

   <div style="margin-top: .3em">

     <a href="http://creativecommons.org/licenses/by-nc-nd/2.0/fr/" rel="license">
       <img alt="Creative Commons License"
            src="http://i.creativecommons.org/l/by-nc-nd/2.0/fr/80x15.png"
            style="border-width:0; vertical-align: middle"
       /></a>

     <span>2014-2015 Michel Corne</span>

   </div>
</div>
